package com.kly.enums;

import lombok.Getter;

/**
 * @author admin
 * @date 2025/2/24
 */
@Getter
public enum TeamStatus {
    PUBLIC(0, "公开"),
    PRIVATE(1, "私有"),
    ENCRYPTED(2, "加密");

    public static TeamStatus getEnumByCode(Integer code) {
        for (TeamStatus value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private final Integer code;

    private final String description;

    TeamStatus(Integer code, String description) {
        this.code = code;
        this.description = description;
    }
}
